package com.aqielife.aqiemusic.performance.utils;

import android.util.Log;

import com.aqielife.aqiemusic.MusicApplication;
import com.aqielife.aqiemusic.performance.timeCounter.Utils;

import java.util.concurrent.ExecutorService;

public class LogUtils {

    private static ExecutorService sExecutorService;

    public static void setExecutor(ExecutorService executorService){
        sExecutorService = executorService;
    }

    public static final String TAG = "performance";

    public static void i(String msg){
        if(Utils.isMainProcess(MusicApplication.getInstance())){
            Log.i(TAG,msg);
        }
        // 异步操作,如果外部注入使用外部的，不然使用内部的
        if(sExecutorService != null){
            // sExecutorService.execute();
        }
    }

}
